package com.huluobo.a2202mvvm_im_douyindemo.touch;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;

import androidx.annotation.Nullable;

/**
 * Created by LC on 2024/4/28.
 */
public class MyTouchView extends View {
    public MyTouchView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent event) {
        Log.i("TagA", "view的分发方法:" + event.getAction());
        return super.dispatchTouchEvent(event);
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        Log.i("TagA", "view的消费方法:" + event.getAction());
        return super.onTouchEvent(event);
    }
}
